package com.cib.process.bean;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "service")
public class EsbResponseResult {
    private ResultHead head;
    private ChatResult body;

    public ResultHead getHead() {
        return head;
    }

    @XmlElement(name = "Head")
    public void setHead(ResultHead head) {
        this.head = head;
    }

    public ChatResult getBody() {
        return body;
    }

    @XmlElement(name = "Body")
    public void setBody(ChatResult body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "EsbResponseResult{" +
                "head=" + head +
                ", body=" + body +
                '}';
    }

    @XmlRootElement(name = "Head")
    public static class ResultHead {
        private String svcCd;
        private String svcScn;

        public String getSvcCd() {
            return svcCd;
        }

        @XmlElement(name = "SvcCd",required = true)
        public void setSvcCd(String svcCd) {
            this.svcCd = svcCd;
        }

        public String getSvcScn() {
            return svcScn;
        }

        @XmlElement(name = "SvcScn",required = true)
        public void setSvcScn(String svcScn) {
            this.svcScn = svcScn;
        }

        @Override
        public String toString() {
            return "ResultHead{" +
                    "svcCd='" + svcCd + '\'' +
                    ", svcScn='" + svcScn + '\'' +
                    '}';
        }
    }


    @XmlRootElement(name = "Body")
    public static class ChatResult{
        private String sessionId;
        private String nextAction;
        private String nextResult;

        public String getSessionId() {
            return sessionId;
        }

        @XmlElement(name = "CnvrstnNo1",required = false)
        public void setSessionId(String sessionId) {
            this.sessionId = sessionId;
        }

        public String getNextAction() {
            return nextAction;
        }

        @XmlElement(name = "InsrNo",required = false)
        public void setNextAction(String nextAction) {
            this.nextAction = nextAction;
        }

        public String getNextResult() {
            return nextResult;
        }

        @XmlElement(name = "ExprtParaml",required = false)
        public void setNextResult(String nextResult) {
            this.nextResult = nextResult;
        }

        @Override
        public String toString() {
            return "ChatResult{" +
                    "sessionId='" + sessionId + '\'' +
                    ", nextAction='" + nextAction + '\'' +
                    ", nextResult='" + nextResult + '\'' +
                    '}';
        }
    }
}
